import junit.framework.TestCase;

public class TestMapController extends TestCase {
        public void testmovePlayer() {
                InventoryModel imodel = new InventoryModel();
                StatusModel smodel = new StatusModel();
                MilestoneModel mmodel = new MilestoneModel();
                StoreModel stmodel = new StoreModel();
                MainPlayerModel mpmodel = new MainPlayerModel();
                StoreView sview = new StoreView(stmodel, mpmodel, imodel);
                MapController mpc = new MapController(smodel, mmodel, imodel, sview);
                double pastX = mpc.getPlayerX();
                double pastY = mpc.getPlayerY();
                mpc.movePlayer(30);
                double presX = mpc.getPlayerX();
                double presY = mpc.getPlayerY();
                int expectedDistance = 30;
                int distTraveled = (int) Math.sqrt(Math.pow(presX-pastX, 2)+Math.pow(presY-pastY, 2));
                assertEquals(expectedDistance, distTraveled);
        }

}